using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class EyeFormMap : EntityTypeConfiguration<EyeForm>
    {
        public EyeFormMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.PatID)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.Date)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.VA_R)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.VAG_R)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.EG_R)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.EyeLid_R)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.Conjunctiva_R)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.Coronea_R)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.Pupil_R)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.Lens_R)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.IOP_R)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.VA_L)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.VAG_L)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.EG_L)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.EyeLid_L)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.Conjunctiva_L)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.Coronea_L)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.Pupil_L)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.Lens_L)
                .IsFixedLength()
                .HasMaxLength(30);

            this.Property(t => t.IOP_L)
                .IsFixedLength()
                .HasMaxLength(30);

            // Table & Column Mappings
            this.ToTable("EyeForm");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.PatID).HasColumnName("PatID");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.VA_R).HasColumnName("VA_R");
            this.Property(t => t.VAG_R).HasColumnName("VAG_R");
            this.Property(t => t.EG_R).HasColumnName("EG_R");
            this.Property(t => t.EyeLid_R).HasColumnName("EyeLid_R");
            this.Property(t => t.Conjunctiva_R).HasColumnName("Conjunctiva_R");
            this.Property(t => t.Coronea_R).HasColumnName("Coronea_R");
            this.Property(t => t.Pupil_R).HasColumnName("Pupil_R");
            this.Property(t => t.Lens_R).HasColumnName("Lens_R");
            this.Property(t => t.IOP_R).HasColumnName("IOP_R");
            this.Property(t => t.Retinea_R).HasColumnName("Retinea_R");
            this.Property(t => t.VA_L).HasColumnName("VA_L");
            this.Property(t => t.VAG_L).HasColumnName("VAG_L");
            this.Property(t => t.EG_L).HasColumnName("EG_L");
            this.Property(t => t.EyeLid_L).HasColumnName("EyeLid_L");
            this.Property(t => t.Conjunctiva_L).HasColumnName("Conjunctiva_L");
            this.Property(t => t.Coronea_L).HasColumnName("Coronea_L");
            this.Property(t => t.Pupil_L).HasColumnName("Pupil_L");
            this.Property(t => t.Lens_L).HasColumnName("Lens_L");
            this.Property(t => t.IOP_L).HasColumnName("IOP_L");
            this.Property(t => t.Retinea_L).HasColumnName("Retinea_L");
        }
    }
}
